﻿using System;
using System.Linq;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Derbster.Domain.Test
{
    [TestClass]
    public class TeamUnitTest : ContractUnitTest
    {
        [TestMethod]
        public void TestMethodCreate()
        {
            var newTeam = new Team("TestTeam");
            Assert.IsNotNull(newTeam);
        }


        [TestMethod]
        public void TestEquals()
        {
            var newTeam = new Team();
            Assert.IsTrue(newTeam.Equals(newTeam));
        }

        [TestMethod]
        public void TestMethodCreateWithSkaters()
        {
            var skaters = TestHelper.CreateHomeTeamSkaters("Home");
            var newTeam = new Team("TestTeam",skaters);
            
            Assert.IsNotNull(newTeam);
            Assert.IsTrue(newTeam.Skaters.Any());
        }
    }
}
